Also, more rewrites.
-
-
- <para> The arc filter is designed to include points based on
- their proximity to an arc, which is a series of connected
- line segments similar to a route or a track but without any
- associated data other than the coordinates.
+<para>
+This filter keeps or removes waypoints based on their proximity to an arc,
+which is a series of connected line segments similar to a route or a track
+but without any associated data other than the coordinates.
</para>
- <para> The arc is defined in a file whose name must be
- provided with the <option>file=XXXX</option> option to the filter.
- That file contains pairs of coordinates for the vertices of
- the arc, one coordinate pair per line. Comments may be
- included by preceding them with a '#' character. An arc file
- looks something like this sample:
+
+<para>
+The arc is defined in a file whose name must be provided with the
+<option>file</option>. That file contains pairs of coordinates for the
+vertices of the arc, one coordinate pair per line. Comments may be
+included by preceding them with a '#' character. An arc file looks
+something like this sample:
</para>
- <screen format="linespecific">
+
+<screen format="linespecific">
# Lima Road/SR3 north of Fort Wayne, Indiana
41.150064468 -85.166207433
41.150064468 -85.165371895
41.147832870 -85.164771080
41.146631241 -85.164384842
41.144270897 -85.163655281
-41.141953468 -85.162882805</screen>
- <para> An arc file may optionally contain gaps in the arc. You can
- specify such a gap by inserting a line containing "#break"
- either on a line by itself or after the coordinates of the
- starting point of the new arc segment.
+41.141953468 -85.162882805
+</screen>
+
+<para>
+An arc file may optionally contain gaps in the arc. You may specify
+such a gap by inserting a line containing "#break" either on a line by
+itself or after the coordinates of the starting point of the new arc segment.
</para>
- <para> In addition to the file containing the arc, you should
- also specify the maximum distance from the arc that will be
- accepted; that distance is declared on the command line with
- the <option>distance=X.XX</option>
- option to the filter. Distance options may be expressed in
- miles (<option>distance=3M</option>) or
- kilometers (<option>distance=3K</option>). The default is
- zero miles. You may also specify the exclude option, which
- causes GPSBabel to only include points that are further than
- the specified distance from the arc.
+
+<example id="example_arc_filter">
+<title>Using the arc filter</title>
+<para>
+Assuming the arc above is in a file called
+<filename moreinfo="none">lima_rd.txt</filename>, the following command line
+would include only points within one mile of the section of Lima Road
+covered by the arc.
</para>
- <para> For example, assuming the arc above is in a file called <filename moreinfo="none">lima_rd.txt</filename>:</para>
- <screen format="linespecific"> gpsbabel -i geo -f 1.loc
- -x arc,file=lima_rd.txt,distance=1 \
- -o mapsend -F 2.wpt</screen>
- <para> would include only points within one mile of the
- section of Lima Road covered by the arc.</para>
+<screen format="linespecific">gpsbabel -i geo -f 1.loc -x arc,file=lima_rd.txt,distance=1 -o mapsend -F 2.wpt</screen>
+</example>
+<para>
+This filter modifies any tracks so that either the distance or the time
+between consecutive points is no less than the specified interval. Where
+points are missing, the filter fills them in by following a straight
+line (actually a great circle) between the adjacent points. You
+must specify either the
+<option>distance</option> or the <option>time</option> option.
+</para>
+<example id="example_interpolate_filter">
+<title>Using the interpolate filter</title>
+<para>
+This command line reads track.gpx and inserts points wherever two adjacent
+trackpoints are more than 10 seconds apart:
+</para>
+<screen format="linespecific">gpsbabel -i gpx -f track.gpx -x interpolate,time=10 -o gpx -f newtrack.gpx</screen>
-
- <para>
- This filter modifies any tracks so that either the distance or the time
- between consecutive points is no less than the specified interval. Where
- points are missing, the filter fills them in by following a straight
- line (actually a great circle) between the adjacent points. You
- must specify either the "distance" or the "time" option.
- </para>
- <screen format="linespecific">gpsbabel -i gpx -f track.gpx -x interpolate,time=10 -o gpx -f newtrack.gpx</screen>
- <para>Reads track.gpx and inserts points wherever two adjacent
- trackpoints are more than 10 seconds apart</para>
- <screen format="linespecific">gpsbabel -i gpx -f track.gpx -x interpolate,distance=15k -o gpx -f newtrack.gpx</screen>
- <para>Reads track.gpx and inserts points wherever two adjacent
- trackpoints are more than 15 kilometers apart</para>
- <screen format="linespecific">gpsbabel -i gpx -f track.gpx -x interpolate,distance=2m -o gpx -f newtrack.gpx</screen>
- <para>Reads track.gpx and inserts points wherever two adjacent
- trackpoints are more than 2 miles apart</para>
-
+<para>
+This command reads track.gpx and inserts points wherever two adjacent
+trackpoints are more than 15 kilometers apart:
+</para>
+
+<screen format="linespecific">gpsbabel -i gpx -f track.gpx -x interpolate,distance=15k -o gpx -f newtrack.gpx</screen>
+
+<para>
+This command reads track.gpx and inserts points wherever two adjacent
+trackpoints are more than 2 miles apart:
+</para>
+
+<screen format="linespecific">gpsbabel -i gpx -f track.gpx -x interpolate,distance=2m -o gpx -f newtrack.gpx</screen>
+</example>
+<para>
+This option is not required, but if it is not specified the distance
+defaults to zero miles, which isn't very useful.
+</para>
+<para>
+This option specifies the maximum distance a point may be from the arc
+without being discarded. Points that are closer to the arc are kept, while
+points that are further away are discarded.
+</para>
+<para>
+Distances may be specified in miles (3M) or kilometers (5K). If no units
+are specified, the distance is assumed to be in miles.
+</para>
+<para>
+When this option is specified, the usual sense of the arc filter is reversed.
+That is, points that are closer than <varname>distance</varname> are discarded
+while points that are further away are kept.
+</para>
+<para>
+This option is required.
+</para>
+<para>
+This option specifies the name of the file containing the arc to use for
+filtering. The format of the file is as described above.
+</para>
+<para>
+GPSBabel supports converting any route or track to a file usable by this
+filter; simply read it in the normal way and write it using the
+<link linkend="fmt_arc">arc</link> file format.
+</para>
+<para>
+When this option is specified, only points that are within the specified
+distance of one of the vertices of the arc are kept. This differs from the
+normal mode of operation in that in the normal mode, points that are close to
+the lines between points are also kept.
+</para>
+<para>
+This option makes the arc filter act like a multi-point version of the
+<link linkend="filter_radius">radius</link> filter.
+</para>
+<para>
+This option specifies the maximum allowable distance between points in the
+track. If two points in the track are further apart than this value, new
+points will be inserted between them.
+</para>
+<para>
+This value may be specified in units of miles (3M) or kilometers (5K). If
+no units are specified, the units are assumed to be miles.
+</para>
+<para>
+Either this option or the <option>time</option> must be specified.
+</para>
-
+<para>
+If this option is specified, the interpolate filter interpolates routes
+rather than tracks. Because route points do not have time stamps, it is an
+error to use this option with the <option>time</option> option.
+</para>
+<para>
+This option specifies the maximum allowable time interval between points in the
+track. If two points in the track are further apart than this value, new
+points will be inserted between them.
+</para>
+<para>
+This value is always specified in units of seconds.
+</para>
+<para>
+Either this option or the <option>distance</option> must be specified.
+</para>
$name2 = $name;
$name2 =~ s/-/_/g;
+ $d2 = $dir2;
+ $d2 =~ s:/.*::;
+ $name2 = $d2.'_'.$name2;
print PARTS qq(<!ENTITY inc_$name2 SYSTEM "../$dir2/$name.xml">\n);
print FILE "\&inc_$name2;\n";
if (! -e "$dir/$dir2/$name.xml") {